package engine.systems.motion.orbit
{
	import ash.core.Component;
	import engine.classes.enumerations.Direction;
	import engine.classes.enumerations.Quadrant;
	import engine.utils.MathUtils;
	
	import flash.display.DisplayObjectContainer;
	
	public class Orbit extends Component
	{
		public var quadrant:String	= Quadrant.UPPER_LEFT;
		
		public var childBack:String 	= "OrbitBack";
		public var childFront:String 	= "OrbitFront";
		
		public var radius:Number;
		public var rate:Number;
		public var offset:Number;
		private var _rotation:Number;
		private var _radians:Number;
		
		public function Orbit(radius:Number, rate:Number = 1, rotation:Number = 0, offset:Number = 0, radians:Number = 0)
		{
			this.radius = radius;
			this.rate = rate;
			this.rotation = rotation;
			this.offset = offset;
			this.radians = radians;
		}
		
		public function get rotation():Number { return this._rotation; }
		public function set rotation(rotation:Number):void
		{
			this._rotation = MathUtils.toRotation(rotation, false);
		}
		
		public function get radians():Number { return this._radians; }
		public function set radians(radians:Number):void
		{
			this._radians = MathUtils.toRotation(radians, false);
		}
	}
}